package io.hexin.util;

import com.alibaba.fastjson.JSONObject;
import io.hexin.bean.User;

public class JwtUtil {

	/**
	 * 生成subject信息
	 * @param user
	 * @return
	 */
	public static String generalSubject(User user){
		JSONObject jo = new JSONObject();
		jo.put("userId", user.getUserId());
		jo.put("roleId", user.getRoleId());
		return jo.toJSONString();
	}
}
